void PCB_stresstest ()
{
  int err;

  PCBDLL **testqueues = PCBDLL_creation( TDF_QUEUES );
  printf("Initialized the queues\n\n");

  PCB *insert1 = PCB_setup ("TestA", 5, SYSTEM, testqueues);
  printf("Attempting to insert TestA into Queue[0]\n");
  err = PCB_insert (testqueues[0], insert1);
  printf("Inserted TestA into Queue[0]\n\n");

  PCB *insert2 = PCB_setup ("TestB", 20, APPLICATION, testqueues);
  printf("Attempting to insert TestB into Queue[0]\n");
  err = PCB_insert (testqueues[0], insert2);
  printf("Inserted TestB into Queue[0]\n\n");

  PCB *insert3 = PCB_setup ("TestC", 1, APPLICATION, testqueues);
  printf("Attempting to insert TestC into Queue[0]\n");
  err = PCB_insert (testqueues[0], insert3);
  printf("Inserted TestC into Queue[0]\n\n");

  printf ("Attempting to print Queue[0] out\n");
  err = PCBDLL_print (testqueues[0]);
  printf ("\n");

  printf ("Attempting to search the queues for TestA\n");
  PCB *find1 = PCB_find ( "TestA\0", testqueues );
  if ( find1 == NULL )
    {
      printf("Didn't find it...\n\n");
    }
  else
    {
      printf("Found it. Proof: it's priority is %d.\n\n", 
	     find1->priority);
    }

  PCB *insert4 = PCB_setup ("TestD", 30, SYSTEM, testqueues);
  printf("Attempting to insert TestD into Queue[1]\n");
  err = PCB_insert (testqueues[1], insert4);
  printf("Inserted TestD into Queue[1]\n\n");

  printf ("Attempting to search the queues for TestD\n");
  PCB *find2 = PCB_find ( "TestD\0", testqueues );
  if ( find2 == NULL )
    {
      printf("Didn't find it...\n\n");
    }
  else
    {
      printf("Found it. Proof: it's priority is %d.\n\n",
             find2->priority);
    }

  printf ("Attempting to print Queue[1] out\n");
  err = PCBDLL_print (testqueues[1]);
  printf ("\n");

  printf ("Attempting to remove TestB from queues.\n");
  err = PCB_remove(PCB_find("TestB\0", testqueues), testqueues);
  printf ("Removed TestB, printing out new Queue[0]\n");
  err = PCBDLL_print (testqueues[0]);
  printf("\n");

  printf ("Attempting to remove TestC from queues.\n");
  err = PCB_remove(PCB_find("TestC\0", testqueues), testqueues);
  printf ("Removed TestC, printing out new Queue[0]\n");
  err = PCBDLL_print (testqueues[0]);
  printf("\n");

  printf ("Attempting to remove TestA from queues.\n");
  err = PCB_remove(PCB_find("TestA\0", testqueues), testqueues);
  printf ("Removed TestA, printing out new Queue[0]\n");
  err = PCBDLL_print (testqueues[0]);
  printf("\n");

  printf ("Attempting to remove TestZ from queues (doesn't exist)\n");
  err = PCB_remove(PCB_find("TestA\0", testqueues), testqueues);
  printf("Removed(?) with error code %d\n\n", err);

  printf ("Attempting to remove TestD from queues.\n");
  err = PCB_remove(PCB_find("TestD\0", testqueues), testqueues);
  printf ("Removed TestD, printing out new Queue[1]\n");
  err = PCBDLL_print (testqueues[0]);
  printf("\n");

  PCB *insert5 = PCB_setup ("TestE", 5, APPLICATION, testqueues);
  printf("Attempting to insert TestE into Queue[2]\n");
  err = PCB_insert (testqueues[2], insert5);
  printf("Inserted TestE into Queue[0]\n\n");

  PCB *insert6 = PCB_setup ("TestF", 5, APPLICATION, testqueues);
  printf("Attempting to insert TestF into Queue[2]\n");
  err = PCB_insert (testqueues[2], insert6);
  printf("Inserted TestF into Queue[2]\n\n");

  printf ("Attempting to print Queue[2] out\n");
  err = PCBDLL_print (testqueues[2]);
  printf ("\n");
  
  PCB *insert7 = PCB_setup ("TestE", 10, APPLICATION, testqueues);
  printf("Attempting to insert TestE into Queue[2]\n");
  err = PCB_insert (testqueues[2], insert7);
  printf("Inserted TestE into Queue[2]\n\n");

  printf ("Attempting to print Queue[2] out\n");
  err = PCBDLL_print (testqueues[2]);
  printf ("\n");

  printf ("Attempting to search the queues for TestY (doesn't exist)\n");
  PCB *find3 = PCB_find ( "TestY\0", testqueues );
  if ( find3 == NULL )
    {
      printf("Didn't find it...\n\n");
    }
  else
    {
      printf("Found it. Proof: it's priority is %d.\n\n",
             find3->priority);
    }


}
